package cn.pupil.design.visitor.impl;

import cn.pupil.design.user.impl.Student;
import cn.pupil.design.user.impl.Teacher;
import cn.pupil.design.visitor.Visitor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @Description: 校长类
 * @Author: pupil
 * @Date: 2024/08/02 上午 10:36
 */
public class Principal implements Visitor {

    private Logger logger = LoggerFactory.getLogger(Principal.class);

    @Override
    public void visit(Student student) {
        logger.info("学生信息 姓名：{} 班级：{}",student.name,student.clazz);
    }

    @Override
    public void visit(Teacher teacher) {
        logger.info("老师信息 姓名：{} 班级：{} 升学率：{}",teacher.name,teacher.clazz,teacher.entranceRatio());
    }
}
